package com.dome.thread;
//线程案例媒介
public class Medium {
    //生产者与消费者之间的媒介,需要设定一些变量
    //先假设媒介中没有任何东西,设定为false
   private boolean falt;
    //假设生产者任务量
    private int count;
    //线程锁
    private final Object lock=new Object();

    public Medium(boolean falt, int count) {
        this.falt = falt;
        this.count = count;
    }

    public boolean isFalt() {
        return falt;
    }

    public void setFalt(boolean falt) {
        this.falt = falt;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public Object getLock() {
        return lock;
    }

    @Override
    public String toString() {
        return "Medium{" +
                "falt=" + falt +
                ", count=" + count +
                ", lock=" + lock +
                '}';
    }

    public Medium(){
         this(false,10);
    }
}
